#if !defined(AFX_DLGIMAGEBRO_H__BD4E2575_2D9D_45FC_9958_D81BAB2E8EF5__INCLUDED_)

#define AFX_DLGIMAGEBRO_H__BD4E2575_2D9D_45FC_9958_D81BAB2E8EF5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgImageBro.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CDlgImageBro dialog
#include "ScrollDlg.h"
#include "afxcmn.h"
#include "DDLoadFileList.h"
class CDlgImageBro : public CScrollDlg
{
// Construction
public:
	CDlgImageBro(CWnd* pParent = NULL);   // standard constructor
	~CDlgImageBro();

// Dialog Data
	//{{AFX_DATA(CDlgImageBro)
	enum { IDD = IDD_TOOL_IMAGEBRO };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

public:
	void LoadFinished();
	BOOL m_bInit;

public:
	void	LoadInitImage();
	void	LoadSubDir(char *pParentDir,bool bAddAssMainDir=false);
private:
	static int CALLBACK CB_OnLoadFileListFun(char *pFileName,zkImgFileTail *pFileTail,DWORD dwContext,void *pContext);
	int OnLoadFileListFun(char *pFileName,zkImgFileTail *pFileTail,DWORD dwContext);

public:
	void  SetFilePath(char *pFilePath,BOOL bMustLoadFileList = FALSE);
	void  LoadParentDir(char *pParentDir,char *pMainDirTitle=_T(""),char *pSubDirTitle=_T(""));
	void  LoadMainDir(char *pMainDir,char *pSubDirTitle=_T(""));
	void  LoadFileList(char *pFileDir);
	char m_szParentDir[MAX_PATH];
	char m_szMainDir[MAX_PATH];
	char m_szSubDir[MAX_PATH];
	char m_szFileName[MAX_PATH];

	DDLoadFileList m_xLoadFileList;

	void  LoadFile();
	int   m_nSelectImgFile; //

public:
	char m_szLastFileTitle[100];

private:
	void SetImageInfo(char *pText);

	char m_sImgDetail[2048];

private:
	BOOL m_bAutoBro;


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgImageBro)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CDlgImageBro)
		// NOTE: the ClassWizard will add member functions here
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

public:
	CComboBox m_ComboxMainDir;
	CComboBox m_ComboxSubDir;
	CListCtrl m_ListImgFile;

public:
	virtual BOOL DestroyWindow();
	afx_msg void OnBnClickedButOpen();
	afx_msg void OnCbnSelchangeComboboxexMaindir();
	afx_msg void OnCbnSelchangeComboboxexSubdir();
	afx_msg void OnNMDblclkListImagefile(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnBnClickedButtonPrePic();
	afx_msg void OnBnClickedButtonNextPic();
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnBnClickedCheckAutoExplore();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGIMAGEBRO_H__BD4E2575_2D9D_45FC_9958_D81BAB2E8EF5__INCLUDED_)
